"use strict";
cc._RF.push(module, '82757bwtopCio6MQSr0gc+D', 'DailyItem');
// scripts/DailyItem.js

"use strict";

var t = require;
var e = module;
var o = exports;

var _i,
    n = void 0 && (void 0).__extends || (_i = function i(t, e) {
  return (_i = Object.setPrototypeOf || {
    __proto__: []
  } instanceof Array && function (t, e) {
    t.__proto__ = e;
  } || function (t, e) {
    for (var o in e) {
      Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
    }
  })(t, e);
}, function (t, e) {
  function o() {
    this.constructor = t;
  }

  _i(t, e), t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o());
}),
    a = void 0 && (void 0).__decorate || function (t, e, o, i) {
  var n,
      a = arguments.length,
      r = a < 3 ? e : null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
  if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);else for (var s = t.length - 1; s >= 0; s--) {
    (n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
  }
  return a > 3 && r && Object.defineProperty(e, o, r), r;
};

Object.defineProperty(o, "__esModule", {
  value: !0
});

var r = t("Util"),
    s = cc._decorator,
    l = s.ccclass,
    c = s.property,
    d = function (t) {
  function e() {
    var e = null !== t && t.apply(this, arguments) || this;
    return e.lab_videoNum = null, e.lab_goldNum = null, e.lab_diamondNum = null, e.lab_boxNum = null, e.icon_masking = null, e.icon_nextMasking = null, e.icon_next = null, e.icon_getend = null, e.icon_box_0 = null, e.icon_box_1 = null, e.icon_box_2 = null, e.icon_vit = null, e.icon_gold = null, e.icon_diamond = null, e;
  }

  return n(e, t), e.prototype.updateItem = function (t, e, o, i, n) {
    this.icon_next.active = 0 != t, this.icon_masking.active = n < e.video, this.icon_nextMasking.active = n < e.video, this.icon_getend.active = o, this.lab_videoNum.string = "" + e.video, this.lab_goldNum.string = "x " + r.Util.transformGoldStr(e.gold), this.lab_diamondNum.string = "x " + r.Util.transformGoldStr(e.diamond), this.lab_boxNum.string = "x " + e.other.num, this.showOtherIcon(e.other.type);
  }, e.prototype.showOtherIcon = function (t) {
    switch (this.icon_box_0.active = !1, this.icon_box_1.active = !1, this.icon_box_2.active = !1, this.icon_vit.active = !1, t) {
      case "vit":
        this.icon_vit.active = !0;
        break;

      case "box_common":
        this.icon_box_0.active = !0;
        break;

      case "box_middle":
        this.icon_box_1.active = !0;
        break;

      case "box_senior":
        this.icon_box_2.active = !0;
    }
  }, e.prototype.getGoldWorldPos = function () {
    return this.icon_gold.convertToWorldSpaceAR(cc.Vec3.ZERO);
  }, e.prototype.getDiamondWorldPos = function () {
    return this.icon_diamond.convertToWorldSpaceAR(cc.Vec3.ZERO);
  }, e.prototype.getVitWorldPos = function () {
    return this.icon_vit.convertToWorldSpaceAR(cc.Vec3.ZERO);
  }, a([c(cc.Label)], e.prototype, "lab_videoNum", void 0), a([c(cc.Label)], e.prototype, "lab_goldNum", void 0), a([c(cc.Label)], e.prototype, "lab_diamondNum", void 0), a([c(cc.Label)], e.prototype, "lab_boxNum", void 0), a([c(cc.Node)], e.prototype, "icon_masking", void 0), a([c(cc.Node)], e.prototype, "icon_nextMasking", void 0), a([c(cc.Node)], e.prototype, "icon_next", void 0), a([c(cc.Node)], e.prototype, "icon_getend", void 0), a([c(cc.Node)], e.prototype, "icon_box_0", void 0), a([c(cc.Node)], e.prototype, "icon_box_1", void 0), a([c(cc.Node)], e.prototype, "icon_box_2", void 0), a([c(cc.Node)], e.prototype, "icon_vit", void 0), a([c(cc.Node)], e.prototype, "icon_gold", void 0), a([c(cc.Node)], e.prototype, "icon_diamond", void 0), a([l], e);
}(cc.Component);

o["default"] = d;

cc._RF.pop();